package com.hong610.quartz;

/**
 * Created by Hong on 2017/2/10.
 */
public class QuartzStatus {

    /**
     * 全部状态
     **/
    private static final String[][] status = {{"WAITING", "等待"}, {"PAUSED", "暂停"}, {"ACQUIRED", "正常执行"}, {"BLOCKED", "阻塞"}, {"ERROR", "错误"}};

    /**
     * 转换状态
     * @param val1 英文状态
     * @return 中文状态
     */
    public static String getStatus(String val1) {
        for (String[] state : status) {
            if (val1.equals(state[0])) {
                return state[1];
            }
        }
        return null;
    }
}
